﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using Microsoft.Xna.Framework.Graphics;
using System.IO;

namespace theguineasyndrome.Utils
{
    public class ImageConverter
    {
        public static Image fromTexture2D(Texture2D texture)
        {
            MemoryStream mem = new MemoryStream();
            texture.SaveAsPng(mem, texture.Width, texture.Height);
            Image image = Image.FromStream(mem);
            return image;
        }
    }
}
